We selected the project based on the following proposal\footnote[1]{\url{http://fims.moodle.gla.ac.uk/file.php/129/L3_Project_Proposals_2011.pdf} \indent\newline(Accessed: February 2012)}: \begin{quote}
\textit{``Instant messaging systems such as Jabber, AIM, ICQ and IRC have become popular in the last few years. The aim of the project is to build a simple instant messaging system, written in Java, to develop your understanding of networked systems and programming. The group will be required to develop both an instant messaging client and server, and to design the network protocol they use to communicate. The server should accept connections from an arbitrary number of clients. Clients will have a graphical user interface, and should be able to accept and receive text-based messages, to indicate if the user is busy, available or idle, and to convey usernames and other details.
The project involves network and user-interface programming. It would suit a group with an interest in low-level systems design and implementation issues.''}
\end{quote}

While this proposal states that we must design a network protocol for our client and server, we were given the option to implement an existing protocol (such as the Extensible Messaging and Presence Protocol, \textit{XMPP}) and, in doing so, focus on implementing a system that was feature rich. Given these two options, we decided to develop the entire system ourselves, as we believed that doing so would give us a better insight into instant messaging and networked systems, and would also give us more flexibility and control over the design and implementation of the system.

Once we had established that we would design and implement the entire system ourselves, we had to decide on the overall functionality of the system. We achieved that by examining and discussing a number of existing instant messaging systems. We found there are three broad categories, based on the primary functionality of the systems we looked at: chatroom-based, user-to-user messaging, and modern social networking systems. While there is overlap between these categories, the \textit{focus} of the systems we looked at fit well into these categories.

\begin{itemize}
\item \textbf{Chatroom-based systems.}
This category includes the many implementations of the Internet Relay Chat (\textit{IRC}) protocol. While IRC allows for both user-to-user and chatroom-based communication, the main focus\footnote[2]{\url{http://tools.ietf.org/html/rfc1459\#section-3.2} \indent\newline(Accessed: March 2012)} is on chatroom-based communication. In addition, it does not provide support for contact lists. There exists a wide number of IRC clients and servers. IRC clients typically allow users to connect to an IRC server, and then join channels or rooms on servers which they are connected to. As an example, we have included screenshots of ``Colloquy'', a popular IRC client. Figure 2.1 shows the connection window, which asks the user to provide a nickname, and the address of the server they want to connect to. Figure 2.2 shows a user connected to multiple chatrooms.

\begin{figure}[h!]
	\center
\includegraphics[scale=0.55]{images/colloquy_connect.png}
\caption{Colloquy ``New Connection'' window}
\end{figure}

\begin{figure}[h!]
	\center
\includegraphics[scale=0.39]{images/collo_chatroom.png}
\caption{Colloquy chatroom window}
\end{figure}

The design and layout of IRC clients varies widely, but the core features remain the same. The clients emphasise chatroom-based, rather than user-to-user, communication. 

\item \textbf{User-to-user systems.}
This is the most popular category, in terms of the number of existing systems, and includes services such as AOL Instant Messenger (AIM), Windows Live Messenger, and Yahoo! Messenger. On these systems, users have accounts which are linked to profile information and a persistent contact list. Users can add each other to their lists, and can send messages to their contacts. A user can message many other users simultaneously. Many of these platforms have the ability to hold conversations involving more than two users, but the primary focus is on user-to-user communication. As an example, figures 2.3 and 2.4 show screenshots of Microsoft Messenger, a Windows Live Messenger client for the Mac OS X operating system. Figure 2.3 shows the main window, which shows buttons to start various types of conversations, and presents the user with their contact list. This is the window which is shown when a user logs in. Figure 2.4 shows a conversation window; this is what appears when a user selects a contact from their list. It is clear from figure 2.4 that the main use of the system is user-to-user communication; the only way to add users (and in doing so, perform multi-user communication) is to ``invite'' users to the conversation. This is unwieldy for large numbers of users, such as might be in an IRC channel.

\begin{figure}[h!]
	\center
\includegraphics[scale=0.39]{images/msn_contacts.png}
\caption{Microsoft Messenger ``Contacts'' window}
\end{figure}

\begin{figure}[h!]
	\center
\includegraphics[scale=0.55]{images/msn_convo.png}
\caption{Microsoft Messenger conversation window}
\end{figure}

\item \textbf{Social networking systems.}
The definition of an instant messaging system is sufficiently ambiguous as to allow social networks, such as Facebook and Twitter, to fall within it. The essence of these systems is the ability to post text, videos or images to a contact list, or the wider public. Other users of these systems can then post comments and replies to these posts, and it is this ability to carry out conversations which categories them as instant messaging systems. 
\end{itemize}

In order to choose the general feature set for our own system, we thought about the various systems, and their features, within these broad categories. After discussing these alternatives, we decided to develop a system which implemented features associated with both chatroom-based and user-to-user based systems. As discussed above, group chat is available on most user-to-user systems, but it is not as full-featured as that available on systems such as IRC. Specifically, we wanted our system to support user accounts, persistent contact lists and offer extensive support for both user-to-user and group conversations. In addition, we wanted to extend the channel paradigm as used in IRC, to allow users to create private, invite-only channels. 

We decided that social networking deviated too strongly from our own notions of what an instant messaging system should do. In choosing a more ``traditional'' instant messaging paradigm, we had the opportunity to combine features from systems which we had used previously, such as Windows Live Messenger and IRC.
